
import * as types from './mutation-types'

const mutations = {
  [types.SWITCH_NAV](state, val) {
    state.activeIndex = val
  },
  [types.SHOW_LOGIN](state, val) {
    state.show_login = val
  },
  [types.SET_USER](state, val) {
    state.user_info = val
  },
  [types.SHOW_EDITOR](state, val) {
    state.show_editor = val
  },
  [types.ASK_QUESTION](state, val) {
    state.question = val
  }
}

export default mutations
